<template>
  <div>
    <el-form
      :model="form"
      :rules="rules"
      ref="form"
      label-width="100px"
      v-loading="loading"
    >
      <el-form-item label="名称" prop="name">
        <el-input v-model="form.name"></el-input>
      </el-form-item>
      <el-form-item label="群组名称" prop="displayName">
        <el-input v-model="form.displayName"></el-input>
      </el-form-item>

      <el-form-item label="头像" prop="portrait">
        <el-input
          v-model="form.portrait"
          placeholder="请输入头像url"
        ></el-input>
      </el-form-item>

      <el-form-item label="附加信息" prop="extra">
        <el-input v-model="form.extra"></el-input>
      </el-form-item>

      <el-form-item label="回调函数" prop="callback">
        <el-input v-model="form.callback"></el-input>
      </el-form-item>

      <el-form-item label="机器人密钥" prop="password">
        <el-input v-model="form.password"></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {},
      rules: {
        // id: [{ required: true, message: "请输入", trigger: "blur" }],
        // url: [{ required: true, message: "请输入", trigger: "blur" }],
      },
      loading: false,
      owner: {},
    };
  },
  created() {},
  methods: {
    setOwner(owner) {
      if (owner) {
        this.owner = owner;
      }
    },
    init(row) {
      this.form = row;
      this.$refs.form.clearValidate();
    },
    validate(cb) {
      this.$refs.form.validate((valid) => {
        if (!valid) {
          return;
        }
        cb(this.form);
      });
    },
  },
};
</script>

<style>
</style>